{% extends 'blog-detail.html' %}

{% load highlight %}


{% block content %}
<div class="content-wrap">

{% for blog in page.object_list %}

    <div>
        <a href="{% url 'blog_id' blog.object.id %}">
            <h3>{{ forloop.counter }}、{% highlight blog.object.title with query %}</h3>
        </a>

        <div style="word-wrap: break-word">
            {% highlight blog.object.content with query %}
        </div>


        {% if forloop.counter == page.object_list|length %}
            {% else %}
            <hr>
        {% endif %}
    </div>
{% empty %}
    <div class="no-post">没有搜索到相关内容，请重新搜索</div>
{% endfor %}

</div>
{% endblock %}
